#ifndef CONVERTNATIVEIMAGETOGREY_H
#define CONVERTNATIVEIMAGETOGREY_H

#include "AmaranthusCommon.h"

#include <QString>
#include <QMessageBox>
#include <string>

#include "itkSmartPointer.h"
#include "itkImage.h"
#include "itkImageIOBase.h"

class ConvertNativeImageToGrey
{

public:
    typedef itk::ImageBase<3> InputImageType;
    typedef typename InputImageType::Pointer InputImagePointer;

    ConvertNativeImageToGrey() {}
    ~ConvertNativeImageToGrey() {}

    GreyImageType* operator()(InputImagePointer nativeImage,
                                itk::ImageIOBase::IOComponentType pixelType);

private:
    GreyImagePointer m_OutputImage;

    template<typename TNative> void DoCast(InputImagePointer nativeImage);
};

#endif
